package service.Impl;

import DBC.DatabaseConnection;
import Factory.DAOFactory;
import domain.beginner;
import service.beginnerService;

import java.util.List;

/**
 * @description: 服务层-实现类
 * @author: hank
 * @create: 2021-04-18 19:24
 **/

@SuppressWarnings("JavaDoc")
public class beginnerServiceImpl implements beginnerService {
    private final DatabaseConnection dbc = new DatabaseConnection();

    @Override
    public List<beginner> beginner() {
        try {
            return DAOFactory.getBeginnerInstance(this.dbc.getConn()).getBeginner();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            this.dbc.close();
        }
        return null;
    }



}
